package com.cheems.cheems_spring_ai.controller;

import com.cheems.cheems_spring_ai.common.BaseResponse;
import com.cheems.cheems_spring_ai.common.ResultUtils;
import com.cheems.cheems_spring_ai.config.Tools;
import com.cheems.cheems_spring_ai.domain.Model;
import com.cheems.cheems_spring_ai.service.ModelService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/model")
public class ModelController {

    @Resource
    private ModelService modelService;

    /**
     * 获取全部模型
     * @return
     */
    @RequestMapping("/list")
    public BaseResponse<List
    <Model>>list() {
        List<Model> list = modelService.list();
        return ResultUtils.success(list);
    }
}
